<?php
$fm_id = $route->bodyParams['fm_id'];

//更新菜单的安装状态
$updateParams = array(
    "update_where" => "fm_id",
    "fm_id"        => $fm_id,
    "fm_is_menu"   => 0
);

$UPDATE_RS = $db->mysqlDB->automaticUpdate($updateParams)->update("sys_organizational_function_module");

if($UPDATE_RS){
    $response->responseData(false);
}

$deleteMeunParams = array(
    "delete_where" => "m_fmid",
    "m_fmid"      => $fm_id,
    "isPhysicallyDelete" => 1
);

$R4 = $db->mysqlDB->automaticDelete($deleteMeunParams)->delete("sys_menu");

if($R4){
    $response->responseData(false);
}else{
    $response->responseData(true);
}